package com.software.form.packinglist.dao;

public class PackingListTransaction {

	private PackingListDao packingListDao;

	public PackingListDao getPackingListDao() {
		return packingListDao;
	}

	public void setPackingListDao(PackingListDao packingListDao) {
		this.packingListDao = packingListDao;
	}
	
	public boolean add(String no,String shipper,String sagentEmail,String containerNo,String oceanVessel,
			String cargoName,String boxes,String quantity,String unitPrice,String totalPrice,
			String unitVolume,String totalVolume,String totalweight,String originPlace,String date){
		PackingList pl = new PackingList();
		pl.setNo(no);
		pl.setShipper(shipper);
		pl.setSagentEmail(sagentEmail);
		pl.setContainerNo(containerNo);
		pl.setOceanVessel(oceanVessel);
		pl.setCargoName(cargoName);
		pl.setBoxes(boxes);
		pl.setQuantity(quantity);
		pl.setUnitPrice(quantity);
		pl.setTotalPrice(totalPrice);
		pl.setUnitVolume(unitVolume);
		pl.setTotalVolume(totalVolume);
		pl.setTotalweight(totalweight);
		pl.setOriginPlace(originPlace);
		pl.setDate(date);
		return packingListDao.add(pl);
	}
	
	public PackingList getPackingListByNo(String no){
		return packingListDao.queryByNo(no);
	}
}
